<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="pojo.GuestDto"  %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>selectInformation</title>
    <link rel="stylesheet" href="checkIn.css">
    <link rel="stylesheet" href="selectInformation.css">
</head>
<body class="bodyType">
    <div class="title">
        <samp>查询与更改</samp>
    </div>
    <div  style="width: 1000px;">
        <div class="total">
            <div class="checkInTitel">
                旅客查询
            </div>
            <hr style="color: #f1f1f1; width: 100%;">
            <form action="selectInfoServlet" method="post">
                <div class="selectDiv">
                    <label for="selectWhich" class="selectWhich">查找类型:</label>
                    <select name="selectWhich" id="selectWhich" class="selectWhich">
                        <option value="1">姓名</option>
                        <option value="2">房号</option>
                        <option value="3">身份证</option>
                    </select>
                    <label for="guestStatus" style="margin-left: 17px;">旅客状态:</label>
                    <select name="guestStatus" id="guestStatus">
                        <option value="1">现在居住</option>
                        <option value="0">历史居住</option>
                    </select>
                    <label for="selectName" style="padding-left: 17px;">匹配内容：</label>
                    <input type="text" name="selectName" id="selectName" class="selectInput">
                    <input type="submit" value="查询"  style="width: 50px; height: 26px; margin-left: 17px; border-radius: 5px; border: none;">
                    <div class="showInformation">
                        <div style="border:  #f1f1f1 solid 1px;">
                            <table style="padding: 2px;" class="selectTable">
                                <tr>
                                    <td>姓名</td>
                                    <td>性别</td>
                                    <td>电话号码</td>
                                    <td>房号</td>
                                    <td>身份证</td>
                                    <td>入住时间</td>
                                </tr>
                             	<%
                             		List<GuestDto> list = (List<GuestDto>)session.getAttribute("selectGuest");
                             		if(list!=null && list.size()!=0){
                             			for(int i=0;i<list.size();i++){
                             				GuestDto gue = list.get(i);
                             				%>
                             					<tr>
				                                    <td><%=gue.name %></td>
				                                    <td><%=gue.sex %></td>
				                                    <td><%=gue.tel %></td>
				                                    <td><%=gue.roomNum %></td>
				                                    <td><%=gue.id%></td>
				                                    <td><%=gue.day%></td>
				                                </tr>
                             					
                             				<%
                             			}
                             		}
                             	 %>
                            </table>
                        </div>
                    </div>
                </div>
            </form>
        </div>
        <div class="total" style="margin-top: 5px;">
            <div class=" checkInTitel">
                在住旅客信息修改
            </div>
            <hr style="color: #f1f1f1; width: 100%;">

            <form action="modInfoServlet" method="post">
                <div class="userCondition">
                    <label for="roomNum">房号：</label>
                    <input type="text" style="width: 70px;" name="roomNum" id="roomNum">
    
                    <label for="guestName1" style="padding-left: 36px;">姓名：</label>
                    <input type="text" style="width:  81px;" name="guestName1" id="guestName1">  
             
                    <div class="telStyle">
                      <label for="tel1">电话号码：</label>
                      <input type="text" name="tel1" id="tel1">
                      <label for="identity1" style="padding-left: 39px;">身份证：</label>
                      <input type="text" name="identity1" id="identity1">
                      <input type="submit"  style="width: 50px; height: 26px; margin-left: 27px;" value="修改">
                    </div>
                </div>
            </form>
        </div>
    </div>

</body>
</html>